sa0.post = (e = {}, type = 'none') => {
    if (typeof e.url === 'undefined') {
        console.log({'data': {'message': '好像没有定义URL呢。'}, 'state': 201})
        return
    }
    let url = e.url
    let data = typeof e.data === 'undefined' ? {} : e.data
    let then = typeof e.then === 'undefined' ? res => console.log(res) : e.then
    let done = typeof e.done === 'undefined' ? res => console.log(res) : e.done
    let error = typeof e.error === 'undefined' ? err => console.log(err) : e.error
    let loading = layer.load(1, {shade: [0.1, '#fff']});
    switch (type) {
        case "base64":
            axios_do({
                method: 'post', url, data: sa0.base64.encode(JSON.stringify(data)),
                headers: {'content-type': 'application/json'}
            }, res => {
                layer.close(loading);
                res = JSON.parse(sa0.base64.decode(res.data))
                done(res);
                (Number(res.code) !== 200) ? error(res) : then(res)
            })
            break;
        default:
            axios_do({
                method: 'post', url, data, transformRequest: [data => {
                    let ret = ''
                    for (let i in data) ret += encodeURIComponent(i) + '=' + encodeURIComponent(data[i]) + '&'
                    return ret
                }],
                headers: {'content-type': 'application/x-www-form-urlencoded'}
            }, res => {
                layer.close(loading);
                done(res.data);
                (Number(res.data.code) !== 200) ? error(res.data) : then(res.data)
            })
    }
}
const axios_do = (d, t) => {
    axios(d).then(t).catch(err => console.log({
        'message': '好像 POST 进行时发生错误了呢，请及时查明原因。',
        'url': d.url,
        'state': 201,
        'err': err
    }))
}
